﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin.Master" AutoEventWireup="true" CodeBehind="firmalar.aspx.cs" Inherits="SinavSistemi.firmalar" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2> Daha İyi Bir Kontrol İçin Kullanıcıların Çalıştıkları Firmaları Girin</h2>
     <table>
        <tr>
            <td>Firma Adı</td>
            <td>
                <asp:TextBox ID="txtFirmaadi" runat="server"></asp:TextBox></td>
        </tr>
          <tr>
            <td>Yetkili Kişiadı</td>
            <td>
                <asp:TextBox ID="txtYetkili" runat="server"></asp:TextBox></td>
        </tr>
            <tr>
            <td>İletişim Nosu</td>
            <td>
                <asp:TextBox ID="txtIletisım" runat="server"></asp:TextBox></td>
        </tr>
     
               <tr>
            <td></td>
            <td>
                <asp:Button ID="Button1" runat="server" Text="Firma Ekle" OnClick="Button1_Click" /></td>
        </tr>
    </table>


    <br />  
    <br />
    <br />
    <h2>Sistemdeki Firmalar</h2>
    <table>
       <tr>
       <th></th>
           <th>FirmaID</th>
           <th>Firma Adi</th>
           <th>Yetkili Kişi</th>
           <th>İletişim Numarası</th>
       </tr>
     <%
         System.Data.SqlClient.SqlConnection sqlcon = SinavSistemi.Class.connection.baglanti;
         System.Data.SqlClient.SqlCommand sqlcmd = new System.Data.SqlClient.SqlCommand("select * from firmalar",sqlcon);
         sqlcon.Open();

         System.Data.SqlClient.SqlDataReader sdr = sqlcmd.ExecuteReader();
         while (sdr.Read())
         {
             Response.Write("<tr>");
             Response.Write("<td>" + sdr["firmaID"] + "</td><td>" + sdr["firmaadi"] + "</td><td>" + sdr["yetkili"] + "</td><td>" + sdr["tel"] + "</td>");
             Response.Write("</tr>");
         }
         
         sqlcon.Close();
         
          %>
     </table>

</asp:Content>
